﻿-- =========================================================================================================
-- Author:		MICHAEL RITACCO
-- Copyright:	2010 MEKHANO GROUP LLC
-- Version:		08/21/2010 1.0
-- =========================================================================================================
CREATE PROCEDURE [flcr].[api_service_dml_del]
	 (@SERVICE_UDT AS flcr.SERVICE_UDT READONLY)

AS

BEGIN TRY
	BEGIN TRAN;
	
	DELETE	[flcr].[SERVICE] 
	 WHERE	[SERVICE_ID] IN (SELECT [SERVICE_ID] FROM @SERVICE_UDT)

	DELETE	[flcrTM].[SERVICE] 
	 WHERE	[SERVICE_ID] IN (SELECT [SERVICE_ID] FROM @SERVICE_UDT)

	COMMIT TRAN;

END TRY
BEGIN CATCH
	ROLLBACK TRANSACTION;
	EXEC [flcr].[utl_getDBError];
END CATCH